//
//  SceneryCell.m
//  lv678
//
//  Created by apple on 15/9/6.
//  Copyright (c) 2015年 lampshade. All rights reserved.
//  自定义景点列表单元格

#import "SceneryCell.h"
#import "UIImageView+WebCache.h"
@implementation SceneryCell

- (void)awakeFromNib {
//    self.sceneryDetail.adjustsFontSizeToFitWidth = YES;
    self.sceneryDetail.lineBreakMode = NSLineBreakByWordWrapping;
    [self.sceneryDetail setNumberOfLines:0];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];


}

- (void)setModel:(SceneryListModel *)model{
    _model = model;
    NSString *markPrict = @"市场价:￥";
    NSString *price = @"￥";
    price = [[price stringByAppendingString:_model.Price]stringByAppendingString:@"起"];
    [self.sceneryImage sd_setImageWithURL:[NSURL URLWithString:_model.Image] placeholderImage:nil];
    NSString *score = _model.CommentGrade;
    score = [score stringByAppendingString:@"分"];
    self.sceneryName.text = _model.Name;
    self.sceneryDetail.text = _model.ProductManagerRecommand;
    self.sceneryScore.text = score;
    self.sceneryMarketPrice.text = [markPrict stringByAppendingString:_model.MarketPrice];
    self.sceneryLocation.text = [_model.ProvinceName stringByAppendingString: _model.DistrictName];
    self.sceneryPrice.text = price;
}
@end
